<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.wenwu.common.utils.Status.AttachmentFrom"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>文物调查表单</title>
<script type="text/javascript" src="${path}/js/scripts/bootstart.js"></script>
<link rel="stylesheet" type="text/css" href="${path}/css/focus.css" />
</head>
<body>
	<script type="text/plain" id="myEditorFile"></script>
	<form id="dataForm" method="post">
		<div style="display: none">
			<input id="workId" name="workId" class="mini-textbox" />
			<input id="surveyId" name="surveyId" class="mini-textbox" />
		</div>
		<div class="form_nav">
			<table width="100%" cellpadding="4" cellspacing="0">
				<tr>
					<td width="10%" class="xx_bt nonebor">项目编号:</td>
					<td width="23%" class="xx_type  nonebor"><input name="number" readonly="readonly"
						style="width: 90%;" class="mini-textbox" id="number" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt nonebor">项目名称:</td>
					<td width="23%" class="xx_type  nonebor"><input name="projectName" readonly="readonly"
						style="width: 90%;" class="mini-textbox" id="projectName" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">申报审批情况:</td>
					<td width="90%" class="xx_type  " colspan="3"><input name="approval"
						style="width: 80%;" class="mini-textArea" vtype="maxLength:1000" />
						<!-- 附件上传开始 --> <a class="mini-button" iconCls="icon-upload"
						onclick="upFiles('<%=AttachmentFrom.RELICS_SURVEY_01%>','showfiles1')">浏览文件</a>
						<!-- 附件上传结束-->	
					</td>
					<td class="xx_type" id="showfiles1" colspan = "2">
					<c:if test="${param.flag=='edit'}">
							<c:if test="${!empty attachments}">
								<c:forEach var="att" items="${attachments}">
									<c:if test="${att.attachmentOwner == 121}">
									<input type="hidden" value="${att.attachmentPath}"
										name="filePath">
									<input type="hidden" value="${att.attachmentName}"
										name="fileName">
									<input type="hidden" value="${att.attachmentOwner}"
										name="attachmentOwner">
									<a target="_blank" href="${att.attachmentPath}" class="views">${att.attachmentName}</a>
									<br />
									</c:if>
								</c:forEach>
							</c:if>
						</c:if>
					</td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">资金投入及使用情况:</td>
					<td width="90%" class="xx_type  " colspan="3"><input name="funding"
						style="width: 80%;" class="mini-textArea" vtype="maxLength:1000" />
						<!-- 附件上传开始 --> <a class="mini-button" iconCls="icon-upload"
						onclick="upFiles('<%=AttachmentFrom.RELICS_SURVEY_02%>','showfiles2')">浏览文件</a>
						<!-- 附件上传结束-->	
					</td>
					<td class="xx_type" id="showfiles2" colspan = "2">
					<c:if test="${param.flag=='edit'}">
							<c:if test="${!empty attachments}">
								<c:forEach var="att" items="${attachments}">
									<c:if test="${att.attachmentOwner == 122}">
									<input type="hidden" value="${att.attachmentPath}"
										name="filePath">
									<input type="hidden" value="${att.attachmentName}"
										name="fileName">
									<input type="hidden" value="${att.attachmentOwner}"
										name="attachmentOwner">
									<a target="_blank" href="${att.attachmentPath}" class="views">${att.attachmentName}</a>
									<br />
									</c:if>
								</c:forEach>
							</c:if>
						</c:if>
					</td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">开始时间:</td>
					<td width="23%" class="xx_type  "><input name="begintime"
						style="width: 90%;" class="mini-datepicker" allowInput="false" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">结束时间:</td>
					<td width="23%" class="xx_type  "><input name="endtime"
						style="width: 90%;" class="mini-datepicker" allowInput="false" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">时长:</td>
					<td width="23%" class="xx_type  "><input name="timelength"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">单位名称:</td>
					<td width="23%" class="xx_type  "><input name="organName"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">单位地址:</td>
					<td width="23%" class="xx_type  "><input name="organAddress"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">负责人:</td>
					<td width="23%" class="xx_type  "><input name="chargePerson"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">单位资质:</td>
					<td width="23%" class="xx_type  "><input name="organAptitude"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">调查人数量:</td>
					<td width="23%" class="xx_type  "><input name="investNumber"
						style="width: 90%;" class="mini-textbox" vtype="float" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">技术人员:</td>
					<td width="23%" class="xx_type  "><input name="techPerson"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">其他人员:</td>
					<td width="23%" class="xx_type  "><input name="otherPerson"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">调查区域:</td>
					<td width="23%" class="xx_type  "><input name="investArea"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">调查概况:</td>
					<td width="23%" class="xx_type  "><input name="investOverview"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">设备及工具:</td>
					<td width="23%" class="xx_type  " " colspan="5"><input name="device"
						style="width: 90%;" class="mini-textArea" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">调查结果:</td>
					<td width="90%" class="xx_type  " colspan="3"><input name="investResult"
						style="width: 80%;" class="mini-textArea" vtype="maxLength:1000" />
						<!-- 附件上传开始 --> <a class="mini-button" iconCls="icon-upload"
						onclick="upFiles('<%=AttachmentFrom.RELICS_SURVEY_03%>','showfiles3')">浏览文件</a>
						<!-- 附件上传结束-->	
					</td>
					<td class="xx_type" id="showfiles3" colspan = "2">
					<c:if test="${param.flag=='edit'}">
							<c:if test="${!empty attachments}">
								<c:forEach var="att" items="${attachments}">
									<c:if test="${att.attachmentOwner == 123}">
									<input type="hidden" value="${att.attachmentPath}"
										name="filePath">
									<input type="hidden" value="${att.attachmentName}"
										name="fileName">
									<input type="hidden" value="${att.attachmentOwner}"
										name="attachmentOwner">
									<a target="_blank" href="${att.attachmentPath}" class="views">${att.attachmentName}</a>
									<br />
									</c:if>
								</c:forEach>
							</c:if>
						</c:if>
					</td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">备注:</td>
					<td width="90%" class="xx_type  " colspan="3"><input name="remark"
						style="width: 80%;" class="mini-textArea" vtype="maxLength:1000" />
						<!-- 附件上传开始 --> <a class="mini-button" iconCls="icon-upload"
						onclick="upFiles('<%=AttachmentFrom.RELICS_SURVEY_04%>','showfiles4')">浏览文件</a>
						<!-- 附件上传结束-->	
					</td>
					<td class="xx_type" id="showfiles4" colspan = "2">
					<c:if test="${param.flag=='edit'}">
							<c:if test="${!empty attachments}">
								<c:forEach var="att" items="${attachments}">
									<c:if test="${att.attachmentOwner == 124}">
									<input type="hidden" value="${att.attachmentPath}"
										name="filePath">
									<input type="hidden" value="${att.attachmentName}"
										name="fileName">
									<input type="hidden" value="${att.attachmentOwner}"
										name="attachmentOwner">
									<a target="_blank" href="${att.attachmentPath}" class="views">${att.attachmentName}</a>
									<br />
									</c:if>
								</c:forEach>
							</c:if>
						</c:if>
					</td>
				</tr>
			</table>
		</div>
		<div style="text-align: center; padding: 10px;">
			<c:if test="${param.flag!='show'}">
				<a class="mini-button" onclick="addform.saveData" id="sub_button"
					iconCls="icon-save" style="width: 60px; margin-right: 20px;">保存</a>
			</c:if>
			<a iconCls="icon-cancel" class="mini-button" onclick="$.form.onClose()" style="width: 60px;">取消</a>
		</div>
	</form>
</body>
<script type="text/javascript" src="${path}/js/scripts/dataform.js"></script>
<script type="text/javascript" charset="utf-8" src="${path}/js/scripts/swfupload/swfupload.js"></script>
<script type="text/javascript" src="${path}/js/scripts/plugin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="${path}/js/scripts/plugin/ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="${path}/js/upload.js"></script>
<script type="text/javascript">
	var doc = $(document);
	$(function() {
		$.form.init(); //初始化表单
		window.addform = {};
		addform.saveData = function() {
			var form = new mini.Form("#dataForm");
			form.validate();
			if (form.isValid() == false) {
				return;
			}
			$.form.saveData({
				url : "${path}/mgr/worksurvey/saveaddForm",
				showMsg : true,//是否显示提示信息（返回参数必须是msg，json类型数据）
				id : "dataForm"
			});
		};
		
	});
	//页面初始化时，执行该函数资源类型
	window.onload = function() {
		mini.get("workId").setValue("${param.workId}");
		mini.get("number").setValue(decodeURI("${param.number}"));
		mini.get("projectName").setValue(decodeURI("${param.projectName}"));
	};
</script>
</html>